package Xsxkxt;

public class Teacher extends p {
    String lesson;

    public Teacher(int code, String name, String sex, String lesson) {
        super(code, name, sex);
        this.code = code;
        this.name = name;
        this.sex = sex;
        this.lesson = lesson;
    }

    public String toString() {
        return "教师信息:" + "  编号：" + code + " 姓名：" + name + " 性别：" + sex + " 所授课程：" + lesson;
    }

}

